package com.bsoft.gol.hcs.common.entity;

import javax.persistence.*;
import java.util.Date;
import java.util.Objects;

@Entity
@Table(name = "sys_parameter", catalog = "")
public class SysParameter {
    private String sysParameterId;
    private String hospitalCode;
    private String hospitalName;
    private String parameterKey;
    private String parameterValue;
    private String parameterRemake;
    private String parameterUnit;
    private String parameterDefaultValue;
    private byte parameterState;
    private byte parameterStartLoading;
    private Date gmtCreate;
    private Date gmtModified;
    private byte parameterType;
    private byte parameterLevel;

    @Id
    @Column(name = "sys_parameter_id")
    public String getSysParameterId() {
        return sysParameterId;
    }

    public void setSysParameterId(String sysParameterId) {
        this.sysParameterId = sysParameterId;
    }

    @Basic
    @Column(name = "hospital_code")
    public String getHospitalCode() {
        return hospitalCode;
    }

    public void setHospitalCode(String hospitalCode) {
        this.hospitalCode = hospitalCode;
    }

    @Basic
    @Column(name = "hospital_name")
    public String getHospitalName() {
        return hospitalName;
    }

    public void setHospitalName(String hospitalName) {
        this.hospitalName = hospitalName;
    }

    @Basic
    @Column(name = "parameter_key")
    public String getParameterKey() {
        return parameterKey;
    }

    public void setParameterKey(String parameterKey) {
        this.parameterKey = parameterKey;
    }

    @Basic
    @Column(name = "parameter_value")
    public String getParameterValue() {
        return parameterValue;
    }

    public void setParameterValue(String parameterValue) {
        this.parameterValue = parameterValue;
    }

    @Basic
    @Column(name = "parameter_remake")
    public String getParameterRemake() {
        return parameterRemake;
    }

    public void setParameterRemake(String parameterRemake) {
        this.parameterRemake = parameterRemake;
    }

    @Basic
    @Column(name = "parameter_unit")
    public String getParameterUnit() {
        return parameterUnit;
    }

    public void setParameterUnit(String parameterUnit) {
        this.parameterUnit = parameterUnit;
    }

    @Basic
    @Column(name = "parameter_default_value")
    public String getParameterDefaultValue() {
        return parameterDefaultValue;
    }

    public void setParameterDefaultValue(String parameterDefaultValue) {
        this.parameterDefaultValue = parameterDefaultValue;
    }

    @Basic
    @Column(name = "parameter_state")
    public byte getParameterState() {
        return parameterState;
    }

    public void setParameterState(byte parameterState) {
        this.parameterState = parameterState;
    }

    @Basic
    @Column(name = "parameter_start_loading")
    public byte getParameterStartLoading() {
        return parameterStartLoading;
    }

    public void setParameterStartLoading(byte parameterStartLoading) {
        this.parameterStartLoading = parameterStartLoading;
    }

    @Basic
    @Column(name = "gmt_create")
    public Date getGmtCreate() {
        return gmtCreate;
    }

    public void setGmtCreate(Date gmtCreate) {
        this.gmtCreate = gmtCreate;
    }

    @Basic
    @Column(name = "gmt_modified")
    public Date getGmtModified() {
        return gmtModified;
    }

    public void setGmtModified(Date gmtModified) {
        this.gmtModified = gmtModified;
    }

    @Basic
    @Column(name = "parameter_type")
    public byte getParameterType() {
        return parameterType;
    }

    public void setParameterType(byte parameterType) {
        this.parameterType = parameterType;
    }

    @Basic
    @Column(name = "parameter_level")
    public byte getParameterLevel() {
        return parameterLevel;
    }

    public void setParameterLevel(byte parameterLevel) {
        this.parameterLevel = parameterLevel;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) {
            return true;
        }
        if (o == null || getClass() != o.getClass()) {
            return false;
        }
        SysParameter that = (SysParameter) o;
        return parameterState == that.parameterState &&
                parameterStartLoading == that.parameterStartLoading &&
                parameterType == that.parameterType &&
                parameterLevel == that.parameterLevel &&
                Objects.equals(sysParameterId, that.sysParameterId) &&
                Objects.equals(hospitalCode, that.hospitalCode) &&
                Objects.equals(hospitalName, that.hospitalName) &&
                Objects.equals(parameterKey, that.parameterKey) &&
                Objects.equals(parameterValue, that.parameterValue) &&
                Objects.equals(parameterRemake, that.parameterRemake) &&
                Objects.equals(parameterUnit, that.parameterUnit) &&
                Objects.equals(parameterDefaultValue, that.parameterDefaultValue) &&
                Objects.equals(gmtCreate, that.gmtCreate) &&
                Objects.equals(gmtModified, that.gmtModified);
    }

    @Override
    public int hashCode() {
        return Objects.hash(sysParameterId, hospitalCode, hospitalName, parameterKey, parameterValue, parameterRemake, parameterUnit, parameterDefaultValue, parameterState, parameterStartLoading, gmtCreate, gmtModified, parameterType, parameterLevel);
    }
}
